As an important technology that supports cloud computing, a virtualization technology has become a basic resource management technology in a data center or a cloud environment.
Network Function Virtualization (NFV) is an abstract representation method of computer resources, and runs a network function in a general-purpose computer. The network function virtualization can implement sharing of the computer resources, and allow multiple virtual network function (VNF) instances (for example, a virtual machine (VM)) to be parallelly run in a physical computer, to implement efficient use of physical resources.
Virtual machine migration is one of important technologies of the network function virtualization. Live migration of a virtual machine, also referred to as in-service migration of a virtual machine, means that when a migration operation is started between a source virtual machine and a target virtual machine, an service of the source virtual machine is not interrupted. That is, in an initial phase of live migration, the service still runs on the source virtual machine. As the migration operation between the source virtual machine and the target virtual machine is in progress, when the target virtual machine has sufficient resources for system running, the service run on the source virtual machine is switched, after a short switching time, to the target virtual machine for continuous running. In this case, an operation of the service on the source virtual machine is terminated. Because the service switching time is short, a user is unaware of a pause that occurs in execution of the service in a live migration process.
Generally, it is relatively common to use a live migration manner between virtual machines. Currently, a main focus of research and application of live migration is on a local area network environment, and memory data and a central processing unit (CPU) status are main data that needs to be migrated in the live migration process.
The memory data refers to data in a memory of a virtual machine, may be data required for computing in a CPU, may be data that needs to be stored in a storage device, or the like, and generally is stored in units of pages.
The CPU status refers to a running process, a started service, and the like in a CPU of a VM.
Phases of migrating the memory data and the CPU status between virtual machines include a push-copy phase, a stop-and-copy phase, and a pull phase.
Push-copy phase: When migration is started between a source virtual machine and a target virtual machine, the source virtual machine continues to run, and a virtual machine monitor (VMM) copies, to the target virtual machine, memory data that is generated in the source virtual machine and memory data that is being modified in the source virtual machine.
To ensure consistency of memory data between the source virtual machine and the target virtual machine, the source virtual machine receives to-be-processed data in a process of pushing and copying the memory data, and processes the data, resulting in a change of the copied memory data. In this case, the VMM sends changed memory data to the target virtual machine.
Stop-and-copy phase: When the source virtual machine stops running, the VMM copies the remaining changed memory data to the target virtual machine.
Pull phase: After the target virtual machine starts running, when processing received data, the target virtual machine finds that the memory data lacks memory data required for processing the data, and in this case, obtains, by means of replication from the source virtual machine in a memory data missing manner, the memory data required for processing the data.
A stop-and-copy manner and a pull manner belong to a supplementary manner of a push-copy manner. In live migration, memory data migration between the source virtual machine and the target virtual machine is mainly implemented in the push-copy manner, which also means that the source virtual machine sends changed memory data to the target virtual machine, provided that the memory data in the source virtual machine changes.
It can be learned that, in a live migration manner used in current virtual machine migration, the memory data in the source virtual changes, provided that the source virtual machine receives the to-be-processed data, and therefore a quantity of times the source virtual machine sends the changed memory data to the target virtual machine is increased, and performance of memory data migration between the source virtual machine and the target virtual machine is affected.